package com.lee.decorate.service;

import com.lee.decorate.service.GatewayComponent;

/**
 * @author zfl_a
 * @Desc 抽象装饰者：持有对具体构件角色的引用并定义与抽象接口角色一致的接口
 * @date 2020/8/14
 * @project springboot_design_pattern
 */
public class AbstractDecorator extends GatewayComponent {

    public GatewayComponent gatewayComponent;

    public AbstractDecorator() {
    }

    public AbstractDecorator(GatewayComponent gatewayComponent) {
        this.gatewayComponent = gatewayComponent;
    }

    @Override
    public void accessManager() {
        if (gatewayComponent != null) {
            gatewayComponent.accessManager();
        }
    }
}
